Skip to content

Add infrastructure tests and runtime requirements - #13

Open
Roach wants to merge 1 commit into
mainfrom
test/infra-and-runtime-requirements
Open

Roach wants to merge 1 commit into
mainfrom
test/infra-and-runtime-requirements

Conversation

@Roach

@Roach Roach commented Sep 29, 2026

Copy link
Copy Markdown

Summary

  • require Node.js 18.12+ and npm 9+, with strict engine enforcement
  • provide Node.js 22 via .nvmrc and update candidate/contributor setup to use npm ci
  • add focused Jest coverage for mock API routing, concurrency, and service-worker message handling

Test coverage

The 12 tests cover:

  • exact/static route matching, named params, HTTP methods, regex escaping, and precedence
  • concurrency limits, queued work, and FIFO release order
  • successful mock API requests, params/query/body forwarding, 404s, handler failures, and unrelated messages

Verification

  • clean npm ci --ignore-scripts --no-audit
  • CI=true npm test -- --watchAll=false — 3 suites, 12 tests passed
  • npm run build — compiled successfully
  • git diff --check — passed

This PR is intentionally independent of #12.

@Roach
Roach requested a review from k4y3ff September 29, 2026 21:39
Comment thread README.md

# Install dependencies (this may take a minute)
npm install
npm ci

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a Node developer, so I will ask a potentially silly question: is this line correct? Should candidates indeed be installing the code in this repo using a command called npm ci?

I would have guessed based on the name that npm ci was for... CI? 😂

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✌️ clean install ✌️

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, you learn something new everyday. 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants